package com.example.mallsystem1104.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.mallsystem1104.entity.Carousel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author zy
 * @Date 2024/12/11 14:34
 * @packageName:com.example.mallsystem1104.mapper
 * @ClassName:CarouselMapper
 */
@Mapper
public interface CarouselMapper extends BaseMapper<Carousel> {

    @Select("select carousel.*,good.name as good_name,good.imgs as img from carousel,good where good.id=carousel.id order by show_order ASC")
    List<Carousel> getAllCarousel();
}
